# 开发框架头文件路径
PUBINCL = -I/project/public

# 开发框架cpp文件名
PUBCPP = /project/public/_public.cpp

# mysql头文件存放路径
MYSQLINCL = -I/user/include/mysql/ -I/project/public/db/mysql/

# mysql库文件保存路径
# MYSQLLIB = -L/user/lib64/mysql/
MYSQLLIB = -L/user/lib/

# mysql链接库
MYSQLLIBS = -lmysqlclient

# 开发框架mysql的cpp文件，这里直接包含进来而没有采用链接库，是为了方便调试
MYSQLCPP = /project/public/db/mysql/_mysql.cpp

# 编译参数
CFLAGS = -g -Wno-write-strings

all:crtsurfdata1 obtcodetodb obtmindtodb

crtsurfdata1:crtsurfdata1.cpp
	g++ $(CFLAGS) -o crtsurfdata1 crtsurfdata1.cpp $(PUBINCL) $(PUBCPP) -lm -lc
	cp crtsurfdata1 ../bin/.

obtcodetodb:obtcodetodb.cpp
	g++ $(CFLAGS) -o obtcodetodb obtcodetodb.cpp $(PUBINCL) $(PUBCPP) $(MYSQLINCL) $(MYSQLLIB) $(MYSQLLIBS) $(MYSQLCPP) -lm -lc
	cp obtcodetodb ../bin/.

obtmindtodb:obtmindtodb.cpp idcapp.h idcapp.cpp
	g++ $(CFLAGS) -o obtmindtodb obtmindtodb.cpp $(PUBINCL) $(PUBCPP) $(MYSQLINCL) $(MYSQLLIB) $(MYSQLLIBS) $(MYSQLCPP) idcapp.cpp -lm -lc
	cp obtmindtodb ../bin/.

clean:
	rm crtsurfdata1 obtcodetodb obtmindtodb
